From 650fc2f76d0a156e23703683d0c18fa262ecea36 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 23 Jan 2014 13:55:42 +0100 Subject: [PATCH] x86/irq: avoid use-after-free on error path in pirq_guest_bind() This is XSA-83. Coverity-ID: 1146952 Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/irq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index a47d4f640b..db70077e4e 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1590,8 +1590,7 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share) printk(XENLOG_G_INFO "Cannot bind IRQ%d to dom%d. Out of memory.\n", pirq->pirq, v->domain->domain_id); - rc = -ENOMEM; - goto out; + return -ENOMEM; } action = newaction; -- 2.30.2